<?php
 include('./connectbase.php');

 $sql = "select * from product";

 $res = $cont->query($sql);

 $arr = [];

 while($row = $res->fetch_assoc()){
   array_push($arr,$row);
 }

 echo json_encode($arr);
?>